<!DOCTYPE html>
<html>

<head>

   {include file="public/header"}
    <link type="text/css" rel="stylesheet" href="__STATIC__/layout/js/plugins/raty/demo/css/application.css">
    <style>
        .row {
            margin: 0;
        }

        .title_float_A {
            float: right;
            margin-right: 10px;
            margin-top: 7px;
            font-size: 14px;
            padding: 2px 9px;
        }

        .overFlow {
            overflow: hidden;
        }

        .min_H {
            min-height: 40px;
            line-height: 40px;
            font-size: 14px;
        }

        .text_right {
            text-align: right;
        }

        .star_w {
            width: 300px
        }
    </style>

</head>

<body class="white-bg">
<div class="border-bottom white-bg">
    <div class="row  border-bottom white-bg">
        <div class="col-md-12 border_S overFlow"
             style="background: #d0e0e0;line-height: 30px;text-align: left;font-size:16px;color:#333;font-size:16px">
            <span></span><a href="javascript:;" class="title_float_A btn btn-warning" id="subEvaluation">我要评论</a></div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-4 border_R min_H text_right">
            <span>评价类型</span>
        </div>
        <div class="col-md-8 min_H">
            <span>经销商评价</span>
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-4 border_R min_H text_right">
            <span>评价参与人数</span>
        </div>
        <div class="col-md-8 min_H">
            <span>{$data.num}人</span>
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>发展意识:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop"data-score="0">

        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>对自身经营状况及市场的熟悉程度:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop1"data-score="0">

        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>物流、资金管理:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop2"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>人员管理:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop3"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>法人合作意愿:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop4"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>合伙人合作意愿:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop5"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>同业口碑:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop6"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>零销店知名度:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop7"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>批市知名度:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop8"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>客情:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop9"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>运力:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop10"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>经营品牌:</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop11"data-score="0">
    </div>
    <div class="row white-bg border_S min_H">
        <div class="col-md-6 border_R min_H text_right">
            <span>实力(包括资金、运力、人力、网络):</span>
        </div>
        <div class="col-md-6 min_H star_w" id="devorlop12"data-score="0">
        </div>
    </div>
    <div class="row white-bg border_S min_H" style="text-align: center;">
        评价备注：
    </div>
</div>


<!-- 全局js -->
{include file="public/footer"}

<script type="text/javascript" src="__STATIC__/layout/js/plugins/raty/lib/jquery.raty.min.js"></script>
<script>
    $(function () {
        $.fn.raty.defaults.path = '__STATIC__/layout/js/plugins/raty/lib/img';
        $("#devorlop").raty({
            score: '{$data.evaluation.p1}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop1").raty({
            score: '{$data.evaluation.p2}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop2").raty({
            score: '{$data.evaluation.p3}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop3").raty({
            score: '{$data.evaluation.p4}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop4").raty({
            score: '{$data.evaluation.p5}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop5").raty({
            score: '{$data.evaluation.p6}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop6").raty({
            score: '{$data.evaluation.p7}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop7").raty({
            score: '{$data.evaluation.p8}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop8").raty({
            score: '{$data.evaluation.p9}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop9").raty({
            score: '{$data.evaluation.p10}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop10").raty({
            score: '{$data.evaluation.p11}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop11").raty({
            score: '{$data.evaluation.p12}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $("#devorlop12").raty({
            score: '{$data.evaluation.p13}',
            click: function (score, evt) {
                var id = $(this).attr('id');
                $('#'+id).data('score',score);
            }
        })
        $(".star_w").css("width", "300px")

        $('#subEvaluation').on('click',function () {
            var data = {
                p1:$('#devorlop').data('score'),
                p2:$('#devorlop1').data('score'),
                p3:$('#devorlop2').data('score'),
                p4:$('#devorlop3').data('score'),
                p5:$('#devorlop4').data('score'),
                p6:$('#devorlop5').data('score'),
                p7:$('#devorlop6').data('score'),
                p8:$('#devorlop7').data('score'),
                p9:$('#devorlop8').data('score'),
                p10:$('#devorlop9').data('score'),
                p11:$('#devorlop10').data('score'),
                p12:$('#devorlop11').data('score'),
                p13:$('#devorlop12').data('score'),
                jxs_id:'{$data.id}'
            }
            $.ajax({
                'type':'post',
                'url':'{:url("subEvaluation")}',
                'data':data,
                'dataType':'json',
                'success':function (data) {
                    if(data.success){
                        swal({title:data.msg,type:'success'},function () {
                            location.reload();
                        })
                    }else{
                        swal(data.msg,'','warning')
                    }
                }
            })
        })
    })

</script>
</body>

</html>